package com.apiserver.consumer.console.api.system;


import com.apiserver.model.system.entity.SUsers;
import com.apiserver.model.system.response.PageInfo;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @Author feizhou
 * @Description 测试
 * @Date 下午 10:06 2019/10/14 0014
 * @Param 
 * @return 
 **/

@FeignClient(name = "producer-system/v1/users")
public interface UsersInterface {


    /**
     * 根据id 查询用户信息
     * @param id
     * @return
     */
    @RequestMapping(value = "get",method = RequestMethod.GET)
    SUsers get(@RequestParam(value = "id") Long id);




    /**
     * 查询所有分页信息
     * @param pageNum
     * @param pageSize
     * @param account
     * @param mobile
     * @param email
     * @param status
     * @param loginType
     * @return
     */
    @RequestMapping(value = "getAll",method = RequestMethod.GET)
    PageInfo<SUsers> getAll(@RequestParam(value = "pageNum") int pageNum,@RequestParam(value = "pageSize") int pageSize,
                            @RequestParam(value = "account",required = false) String account,@RequestParam(value = "mobile",required = false) String mobile,
                            @RequestParam(value = "email",required = false) String email,@RequestParam(value = "status",required = false) Integer status,@RequestParam(value = "loginType",required = false) Integer loginType);


    /**
     * 保存用户信息
     * @param usersEntity
     * @return
     */
    @RequestMapping(value = "save", method = RequestMethod.POST)
    Map<String,Object> save(@RequestBody SUsers usersEntity);

    /**
     * 修改用户的信息
     * @param usersEntity
     * @return
     */
    @ApiOperation(value = "修改用户的信息", notes = "修改用户的信息")
    @RequestMapping(value = "edite", method = RequestMethod.POST)
    Map<String,Object> edite(@RequestBody SUsers usersEntity) ;

    /**
     * 根据Id 删除信息
     * @param id
     * @return
     */
    @RequestMapping(value = "delete",method = RequestMethod.POST)
    Map<String, Object> delete(@RequestBody Long id);
    /**
     *
     * 描述：列表
     * @author： feizhou
     * @date ：2018/12/20 16:26
     * @param ：[parentId]
     * @return java.util.List<com.apiserver.model.system.response.CategoryJson>
     */
    @RequestMapping(value = "list", method = RequestMethod.GET)
    public List<SUsers> list(
            @RequestParam(value = "id", required = false) Long id,
            @RequestParam(value = "account", required = false) String account,
            @RequestParam(value = "pwd", required = false) String pwd,
            @RequestParam(value = "chineseName", required = false) String chineseName,
            @RequestParam(value = "nickname", required = false) String nickname,
            @RequestParam(value = "email", required = false) String email,
            @RequestParam(value = "mobile", required = false) String mobile,
            @RequestParam(value = "lastDate", required = false) Date lastDate,
            @RequestParam(value = "sex", required = false) String sex,
            @RequestParam(value = "birthday", required = false) Date birthday,
            @RequestParam(value = "nationality", required = false) String nationality,
            @RequestParam(value = "province", required = false) String province,
            @RequestParam(value = "cities", required = false) String cities,
            @RequestParam(value = "address", required = false) String address,
            @RequestParam(value = "idType", required = false) Integer idType,
            @RequestParam(value = "idNumber", required = false) String idNumber,
            @RequestParam(value = "education", required = false) String education,
            @RequestParam(value = "age", required = false) Integer age,
            @RequestParam(value = "household", required = false) String household,
            @RequestParam(value = "ethnic", required = false) String ethnic,
            @RequestParam(value = "blood", required = false) String blood,
            @RequestParam(value = "career", required = false) String career,
            @RequestParam(value = "status", required = false) Integer status,
            @RequestParam(value = "loginType", required = false) Integer loginType,
            @RequestParam(value = "skin", required = false) String skin,
            @RequestParam(value = "modifyId", required = false) String modifyId,
            @RequestParam(value = "roleId", required = false) Long roleId,
            @RequestParam(value = "imageUrl", required = false) String imageUrl,
            @RequestParam(value = "userType", required = false) Integer userType,
            @RequestParam(value = "registerType", required = false) Integer registerType,
            @RequestParam(value = "registerCode", required = false) String registerCode,
            @RequestParam(value = "qqNumber", required = false) String qqNumber,
            @RequestParam(value = "wechat", required = false) String wechat,
            @RequestParam(value = "weibo", required = false) String weibo,
            @RequestParam(value = "openIdWechat", required = false) String openIdWechat,
            @RequestParam(value = "openIdQq", required = false) String openIdQq,
            @RequestParam(value = "openIdWeibo", required = false) String openIdWeibo
    );


}
